import { request } from '@umijs/max'

export interface PreAuthVO {
  preAuthUrl: string
}

export const getPreAuthVO = () => {
  return request<PreAuthVO>(`/api/open/getPreAuthUrl`)
}

export const updateAuthCode = (data: { code: string }) => {
  return request<PreAuthVO>(`/api/open/updateAuthAccessToken`, { method: 'POST', data })
}
